## Makefile
##
## Copyright 2006, Brian Swetland.  All rights reserved.
## See provided LICENSE file or http://frotz.net/LICENSE for details.
##

CC := gcc
CFLAGS := -O2 -g -Wall

all: debug

tbl_%.c: %.c
	python mktable.py $<

OBJS := debugger.o 
OBJS += cmd_basic.o cmd_at91sam7.o 
OBJS += tbl_cmd_basic.o tbl_cmd_at91sam7.o tbl_io_arm7_jtag.o
OBJS += io_arm7_jtag.o io_usb.o io_usb_samba.o
OBJS += usb_linux.o ui_curses.o
OBJS += netbsd_arm_disasm.o

debug: $(OBJS)
	$(CC) -o debug $(OBJS) -lncurses

serial: serial.o
	$(CC) -o serial serial.o

clean:
	rm -f samba ad serial debug *~ *.o tbl_*.c
